package br.inf.solutions.apresentacoes.ssp.model.bulletin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import br.com.vexillum.model.CommonEntity;
import br.com.vexillum.model.annotations.SearchField;

@SuppressWarnings("serial")
@Entity
@Table(name="bulletin_topics")
public class BulletinTopics extends CommonEntity {
	
	@Column(name = "table_name", unique=true, nullable=false)
	private String tableName;
	
	@Column(name = "name_item", unique=true, nullable=false)
	private String nameItem;
	
	@SearchField
	@Column(name = "part", unique=false, nullable=false)
	private Integer part;
	
	@Transient
	private String formURI;

	public BulletinTopics() {}
	
	public BulletinTopics(Long l, String tableName, String formURI) {
		setId(l);
		setTableName(tableName);
		setFormURI(formURI);
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getNameItem() {
		return nameItem;
	}

	public void setNameItem(String nameItem) {
		this.nameItem = nameItem;
	}

	public Integer getPart() {
		return part;
	}

	public void setPart(Integer part) {
		this.part = part;
	}
	
	public String getFormURI() {
		return formURI;
	}

	public void setFormURI(String formURI) {
		this.formURI = formURI;
	}

	@Override
	public String toString() {
		return getNameItem();
	}
}
